# Contributor: Saijin-Naib <Saijin-Naib_package-maintenance@outlook.com>
# Maintainer: Saijin-Naib <Saijin-Naib_package-maintenance@outlook.com>
pkgname=warpinator
pkgver=1.6.4
pkgrel=0
pkgdesc="Share files across the LAN"
url="https://github.com/linuxmint/warpinator"
arch="noarch"
license="GPL-3.0-or-later"
depends="
	bubblewrap
	py3-cairo
	py3-cryptography
	py3-landlock
	py3-google-api-core
	py3-grpcio
	py3-netifaces
	py3-pynacl
	py3-setproctitle
	py3-setuptools
	py3-xapp
	py3-zeroconf
	xapp
	"
makedepends="
	appstream-dev
	gettext-dev
	gobject-introspection
	itstool
	meson
	polkit-dev
	py3-protobuf
	xapp-dev
	"
subpackages="
	$pkgname-lang
	$pkgname-nemo
	"
source="$pkgname-$pkgver.tar.gz::https://github.com/linuxmint/warpinator/archive/refs/tags/$pkgver.tar.gz
	launch-path.patch
	"
options="!check" # doesn't have any tests

build() {
	abuild-meson \
		-Dbundle-landlock=false \
		-Dbundle-zeroconf=false \
		. output
	meson compile -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

nemo() {
	pkgdesc="$pkgdesc (nemo integration)"
	install_if="$pkgname=$pkgver-r$pkgrel nemo"

	amove usr/share/nemo
}

sha512sums="
3b8a3e1e1a1fbd5a61520b32d702d4c196fb97d72c88da999898efd19c2a87af0520d6487da10d92721ee19d6121fe9490c1e65699a02bf1ecb0e416c356f948  warpinator-1.6.4.tar.gz
6f30ec09de40fae3f10f3aaa2d6a16729b84a35e7a7de28ba310ce5b484260385b54c480e92e9b53a471d3bec0302dbee0c1eb991cb3d326ff0ad5c3b4b0c988  launch-path.patch
"
